import axios from '@/utils/request.js'

//获取数据列表
export const getDataManagementDataListAsync = (params) => {
  const { currPage, pageSize, key } = params
  return axios.get(`/lanlu/instance/allProcessInst?currPage=${currPage}&pageSize=${pageSize}&key=${key}`)
}

//查看xml
export const getFlowXmlAsync = (params) => {
  const { procDefId } = params
  return axios.get(`/lanlu/flowDefinition/flowXML?procDefId=${procDefId}`)
}

//查看流程图
export const getFLowChartAsync = (params) => {
  const { proInstId } = params
  return axios.get(`/lanlu/task/flowImg?processId=${proInstId}`)
}

//删除流程实例
export const deletedFlowInstanceAysnc = (params) => {
  const { proInstId } = params
  return axios.delete(`/lanlu/instance/delProcessInst/${proInstId}`)
}


//获取统计数据
export const getDataStatisticAysnc = () => {
  return axios.get('/lanlu/common/allCount')
}

//获取首页数据
export const getHomeDataStatisticAsync = () => {
  return axios.get('/lanlu/common/myCount')

}